/* Copyright (C) 2010 Fredrique Samuels, fredriquesamuels@gmail.com */

/*
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef TRI_KEY_EVENT_H_
#define TRI_KEY_EVENT_H_

#include <iostream>
#include <vector> 

#include "base/utils.h"
#include "mouse_event.h"

namespace tri {

class TDisplayEngine;
class TEventsProcess;

/**
 * Key Event structure
 */
class TKeyEvent {
	
	friend class TDisplayEngine;
	friend class TEventsProcess;
	
public:

	/**
	 * @param button: Active Button (used when 
	 * 				button is pressed or released).
	 * 				Defaults to NONE
	 * @param event:  event type enum
	 */
	TKeyEvent(int key = NONE, int event = NONE);
	virtual ~TKeyEvent();

	/**
	 * Copy a TKeyEvent instance.
	 * 
	 * @param src: Source event
	 * @param dst: Destination event
	 */
	static void copy(const TKeyEvent& src, TKeyEvent&dst);

	static TKeyEvent getCurrentEvent();

	int getKey();
	int getEvent();

	
	//protected:
	int button;
	int event;
	
private:
	static TKeyEvent s_CurrentEvent;

};

}



#endif /*EVENTS_H_*/
